package com.redis.springtest.jedis_test;

import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;

/**
 * Created with IntelliJ IDEA.
 * Description:
 *
 * @author lzy
 * @create 2019-12-16 下午1:46
 */
public class TextPool {
    public static void main(String[] args) {
        final JedisPool jedisPool = JedisPoolUtil.getJedisPool();
        Jedis jedis = null;

        try {
            jedis = jedisPool.getResource();
            System.out.println(jedis.ping());
            jedis.set("aa", "bb");
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            JedisPoolUtil.release(jedis);
        }
    }
}
